package platformer.model.elements;

import java.awt.Point;

import platformer.model.elements.attributes.*;
import platformer.model.elements.states.movement.*;

public class ModelElement
{
	TekPoints 		hitPoints;
	TekPoints 		energyPoints;
	Point 			position;
	MovementState	direction;
	
	
	private void init(
		TekPoints 		hitPoints,
		TekPoints 		energyPoints,
		Point 			position,
		MovementState	direction
	) {		
		this.setHitPoints( hitPoints );
		this.setEnergyPoints( energyPoints );
		this.setPosition( position );
		this.setDirection( direction );		
	}
	
	public ModelElement( int x, int y ) {
		init(null,null,new Point(x,y),new Stopped());
	}

	public ModelElement( int x, int y, long maxHitPoints, long maxEnergyPoints ) {
		init(new TekPoints( maxHitPoints ),new TekPoints( maxEnergyPoints ),new Point(x,y),new Stopped());
	}
	
	public TekPoints getHitPoints()
	{
		return hitPoints;
	}


	public void setHitPoints(TekPoints hitPoints)
	{
		this.hitPoints = hitPoints;
	}


	public TekPoints getEnergyPoints()
	{
		return energyPoints;
	}


	public void setEnergyPoints(TekPoints energyPoints)
	{
		this.energyPoints = energyPoints;
	}


	public Point getPosition()
	{
		return position;
	}


	public void setPosition(Point position)
	{
		this.position = position;
	}


	public MovementState getDirection()
	{
		return direction;
	}


	public void setDirection(MovementState direction)
	{
		this.direction = direction;
	}
}
